/*

File: HelloWorldAppDelegate.h
 //  HelloWorld
 //
 //  Created by Martin Le C. on 6/8/09.
 //  Copyright 2009 __MyCompanyName__. All rights reserved.
 //

*/

#import <UIKit/UIKit.h>
// This includes the header for the SQLite library.
#import <sqlite3.h>
@class MyViewController;
@class SigningInViewController;
@class BuddyListViewController;
@class ChatViewController;
@class Session;
@interface HelloWorldAppDelegate : NSObject <UIApplicationDelegate> {
	
	IBOutlet UIWindow *window;
	IBOutlet UINavigationController *navController;
	MyViewController *myViewController;
	SigningInViewController *signingInViewController;
	BuddyListViewController *buddyListViewController;
	ChatViewController *chatViewController;
	NSString* LoginID;
	Session *ss;
	// Opaque reference to the SQLite database.
    sqlite3 *database;
}

@property (nonatomic, retain) UIWindow *window;
@property (nonatomic, retain) UINavigationController *navController;
@property (nonatomic, retain) MyViewController *myViewController;
@property (nonatomic, retain) SigningInViewController *signingInViewController;
@property (nonatomic, retain) Session *ss;
@property (nonatomic, retain) BuddyListViewController *buddyListViewController;
@property (nonatomic, retain) ChatViewController *chatViewController;
@property (nonatomic, assign)	NSString* LoginID;
- (void) signIn:(NSString*)u p:(NSString*)p;
- (void) cancelSignIn;
- (void) signingInView:(NSString*)u;
- (void) chatView:(NSString*)buddyID;
- (void) releaseViews;
- (void) connect:(id)target;
- (void) sendMsg:(NSString*)to msg:(NSString*)msg;
- (NSMutableArray*)getListOfAllMsgFromThisBuddy:(NSString*)buddyId;
- (void) Session:(Session *) session didReceivedPM:(NSString *)from to:(NSString*)to msg:(NSString*)msg;
- (void) Session:(Session *) session didReceivedBuddyList:(BOOL)did;
- (void) Session:(Session *) session didReceivedBudStatus:(NSString *)buddyId;
- (void) Session:(Session *) session errorLogin:(NSString*)error;
- (void)createEditableCopyOfDatabaseIfNeeded;
- (void)initializeDatabase;
@end
